import ReactDOM from "react-dom/client";
import App from "@/App";
import reportWebVitals from "@/reportWebVitals";
import { Provider as Mbox } from "mobx-react";
import AppStore from "@/store";
import { inject as inject__ph } from "@utils/pointer.event.handler";
import { inject as inject__log } from "@utils/logger";
import { inject as inject__promises_quene } from "@utils/promise.quene";
import "@/index.css";
import { AppProvider } from "@pixi/react";
import * as PIXI from "pixi.js";

const root = ReactDOM.createRoot(
  document.getElementById("root") as HTMLElement
);
inject__ph();
inject__log();
inject__promises_quene();
const app = new PIXI.Application({
  backgroundColor: "transparent",
});
root.render(
  // <React.StrictMode>
  <Mbox {...AppStore}>
    <AppProvider value={app}>
      <App />
    </AppProvider>
  </Mbox>
  // </React.StrictMode>
);

reportWebVitals();
